Program-erase (PE) cycling in conjunction with data retention causes drift of cell voltage levels in flash memory. When a cell level significantly drifts to cross the corresponding default threshold, the normal read operation using the default thresholds will return a false level. When the number of corrupted cells is beyond the capability of error-correction codes, the page is declared a failure. It would therefore be desirable to have error recovery for flash memory.